#!/usr/bin/env python3
"""
Setup script for GSI Wiki Generator
"""

from setuptools import setup, find_packages
from pathlib import Path

# Read README for long description
readme_file = Path(__file__).parent / "README.md"
long_description = readme_file.read_text(encoding='utf-8') if readme_file.exists() else ""

# Read requirements
requirements_file = Path(__file__).parent / "requirements.txt"
requirements = []
if requirements_file.exists():
    requirements = requirements_file.read_text(encoding='utf-8').strip().split('\n')
    requirements = [req.strip() for req in requirements if req.strip() and not req.startswith('#')]

setup(
    name="gsi-wiki-generator",
    version="1.0.0",
    author="GSI Documentation Team",
    author_email="gsi-docs@example.com",
    description="Professional wiki generator for GSI DRP-4DVar implementation",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/gsi-team/gsi-wiki-generator",
    package_dir={"": "src"},
    packages=find_packages(where="src"),
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Topic :: Documentation",
        "Topic :: Scientific/Engineering :: Atmospheric Science",
    ],
    python_requires=">=3.8",
    install_requires=requirements,
    entry_points={
        "console_scripts": [
            "gsi-wiki-gen=gsi_wiki_generator.cli:main",
        ],
    },
    include_package_data=True,
    package_data={
        "gsi_wiki_generator": ["config/*.json"],
    },
    zip_safe=False,
    keywords="gsi enkf 4dvar wiki documentation codebase-rag claude ai",
    project_urls={
        "Bug Reports": "https://github.com/gsi-team/gsi-wiki-generator/issues",
        "Source": "https://github.com/gsi-team/gsi-wiki-generator",
        "Documentation": "https://gsi-wiki-generator.readthedocs.io/",
    },
)